-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Change reindex to use ::es-redacted:: filtering #135414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In audit logs we redact certain fields from the body of rest requests. This commit changes the way we redact fields in the reindex request. Previously the only form of redaction we supported was total removal of fields, however that can be problematic when an admin wants to know whether a field was supplied or not. Here we change the way we redact requests for reindexing to replace fields with `::es-redacted::` instead of removing them.
Pinging @elastic/es-security (Team:Security) |
Hi @tvernum, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with one optional nit. I'll defer to @jfreden to approve.
@Override | ||
public Set<String> getFilteredFields() { | ||
return FILTERED_FIELDS; | ||
return Set.of(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Maybe put an assert false
in here, since it would be a mistake to call the method? Or even just make it throw a UOE or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Might be overkill, but an alternative to this approach is to add a replace
function to XContentMapValues
Should be fairly straight forward since we already have the filter
method.
I considered that, and I think it would be helpful, but also potentially a bikeshed, so perhaps it's worth revisiting if we need this a second time. |
In audit logs we redact certain fields from the body of rest requests. This commit changes the way we redact fields in the reindex request. Previously the only form of redaction we supported was total removal of fields, however that can be problematic when an admin wants to know whether a field was supplied or not. Here we change the way we redact requests for reindexing to replace fields with `::es-redacted::` instead of removing them.
In audit logs we redact certain fields from the body of rest requests. This commit changes the way we redact fields in the reindex request. Previously the only form of redaction we supported was total removal of fields, however that can be problematic when an admin wants to know whether a field was supplied or not. Here we change the way we redact requests for reindexing to replace fields with `::es-redacted::` instead of removing them.
In audit logs we redact certain fields from the body of rest requests. This commit changes the way we redact fields in the reindex request. Previously the only form of redaction we supported was total removal of fields, however that can be problematic when an admin wants to know whether a field was supplied or not. Here we change the way we redact requests for reindexing to replace fields with `::es-redacted::` instead of removing them.
In audit logs we redact certain fields from the body of rest requests. This commit changes the way we redact fields in the reindex request. Previously the only form of redaction we supported was total removal of fields, however that can be problematic when an admin wants to know whether a field was supplied or not. Here we change the way we redact requests for reindexing to replace fields with `::es-redacted::` instead of removing them.
In audit logs we redact certain fields from the body of rest requests. This commit changes the way we redact fields in the reindex request. Previously the only form of redaction we supported was total removal of fields, however that can be problematic when an admin wants to know whether a field was supplied or not. Here we change the way we redact requests for reindexing to replace fields with `::es-redacted::` instead of removing them.
In audit logs we redact certain fields from the body of rest requests. This commit changes the way we redact fields in the reindex request. Previously the only form of redaction we supported was total removal of fields, however that can be problematic when an admin wants to know whether a field was supplied or not. Here we change the way we redact requests for reindexing to replace fields with `::es-redacted::` instead of removing them.
In audit logs we redact certain fields from the body of rest requests.
This commit changes the way we redact fields in the reindex request. Previously the only form of redaction we supported was total removal of fields, however that can be problematic when an admin wants to know whether a field was supplied or not.
Here we change the way we redact requests for reindexing to replace fields with
::es-redacted::
instead of removing them.